<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    let week = prompt("请输入1-7的数字");
    week = Number(week);

    switch (week) {
        case 1:
            //处理语句
            document.write("星期一");
            break;
        case 2:
            //处理语句
            document.write("星期二");
            break;
        case 3:
            //处理语句
            document.write("星期三");
            break;
        case 4:
            //处理语句
            document.write("星期四");
            break;
        case 5:
            //处理语句
            document.write("星期五");
            break;
        case 6:
            //处理语句
            document.write("星期六");
            break;
        case 7:
            //处理语句
            document.write("星期日");
            break;
        default:
            document.write("不在范围内");
            break;
    }
</script>